<template>
  <div class="app-container">
    <!-- 对话框(添加 / 修改) -->
    <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="45%" v-dialogDrag append-to-body>
      <el-form ref="formRef" :model="formData" :rules="formRules" v-loading="formLoading" label-width="100px">
                    <el-form-item label="证券简称" prop="secname">
                      <el-input v-model="formData.secname" placeholder="请输入证券简称" />
                    </el-form-item>
                    <el-form-item label="证券代码" prop="seccode">
                      <el-input v-model="formData.seccode" placeholder="请输入证券代码" />
                    </el-form-item>
                    <el-form-item label="机构名称" prop="orgname">
                      <el-input v-model="formData.orgname" placeholder="请输入机构名称" />
                    </el-form-item>
                    <el-form-item label="公告日期" prop="declaredate">
                      <el-date-picker clearable v-model="formData.declaredate" type="date" value-format="timestamp" placeholder="选择公告日期" />
                    </el-form-item>
                    <el-form-item label="截止日期" prop="enddate">
                      <el-date-picker clearable v-model="formData.enddate" type="date" value-format="timestamp" placeholder="选择截止日期" />
                    </el-form-item>
                    <el-form-item label="报告年度" prop="f001d">
                      <el-input v-model="formData.f001d" placeholder="请输入报告年度" />
                    </el-form-item>
                    <el-form-item label="合并类型编码" prop="f002v">
                      <el-input v-model="formData.f002v" placeholder="请输入合并类型编码" />
                    </el-form-item>
                    <el-form-item label="合并类型" prop="f003v">
                      <el-input v-model="formData.f003v" placeholder="请输入合并类型" />
                    </el-form-item>
                    <el-form-item label="报表来源编码" prop="f004v">
                      <el-input v-model="formData.f004v" placeholder="请输入报表来源编码" />
                    </el-form-item>
                    <el-form-item label="报表来源" prop="f005v">
                      <el-input v-model="formData.f005v" placeholder="请输入报表来源" />
                    </el-form-item>
                    <el-form-item label="货币资金	单位：元" prop="f006n">
                      <el-input v-model="formData.f006n" placeholder="请输入货币资金	单位：元" />
                    </el-form-item>
                    <el-form-item label="结算备付金	单位：元" prop="f077n">
                      <el-input v-model="formData.f077n" placeholder="请输入结算备付金	单位：元" />
                    </el-form-item>
                    <el-form-item label="拆出资金	单位：元" prop="f078n">
                      <el-input v-model="formData.f078n" placeholder="请输入拆出资金	单位：元" />
                    </el-form-item>
                    <el-form-item label="以公允价值计量且其变动计入当期损益的金融资产(20190322弃用)	单位：元" prop="f007n">
                      <el-input v-model="formData.f007n" placeholder="请输入以公允价值计量且其变动计入当期损益的金融资产(20190322弃用)	单位：元" />
                    </el-form-item>
                    <el-form-item label="衍生金融资产	单位：元" prop="f080n">
                      <el-input v-model="formData.f080n" placeholder="请输入衍生金融资产	单位：元" />
                    </el-form-item>
                    <el-form-item label="应收票据	单位：元" prop="f008n">
                      <el-input v-model="formData.f008n" placeholder="请输入应收票据	单位：元" />
                    </el-form-item>
                    <el-form-item label="应收账款	单位：元" prop="f009n">
                      <el-input v-model="formData.f009n" placeholder="请输入应收账款	单位：元" />
                    </el-form-item>
                    <el-form-item label="预付款项	单位：元" prop="f010n">
                      <el-input v-model="formData.f010n" placeholder="请输入预付款项	单位：元" />
                    </el-form-item>
                    <el-form-item label="应收保费	单位：元" prop="f081n">
                      <el-input v-model="formData.f081n" placeholder="请输入应收保费	单位：元" />
                    </el-form-item>
                    <el-form-item label="应收分保账款	单位：元" prop="f082n">
                      <el-input v-model="formData.f082n" placeholder="请输入应收分保账款	单位：元" />
                    </el-form-item>
                    <el-form-item label="应收分保合同准备金	单位：元" prop="f083n">
                      <el-input v-model="formData.f083n" placeholder="请输入应收分保合同准备金	单位：元" />
                    </el-form-item>
                    <el-form-item label="其中：应收利息	单位：元" prop="f013n">
                      <el-input v-model="formData.f013n" placeholder="请输入其中：应收利息	单位：元" />
                    </el-form-item>
                    <el-form-item label="其中：应收股利	单位：元" prop="f014n">
                      <el-input v-model="formData.f014n" placeholder="请输入其中：应收股利	单位：元" />
                    </el-form-item>
                    <el-form-item label="其他应收款	单位：元" prop="f011n">
                      <el-input v-model="formData.f011n" placeholder="请输入其他应收款	单位：元" />
                    </el-form-item>
                    <el-form-item label="应收关联公司款	单位：元" prop="f012n">
                      <el-input v-model="formData.f012n" placeholder="请输入应收关联公司款	单位：元" />
                    </el-form-item>
                    <el-form-item label="买入返售金融资产	单位：元" prop="f084n">
                      <el-input v-model="formData.f084n" placeholder="请输入买入返售金融资产	单位：元" />
                    </el-form-item>
                    <el-form-item label="存货	单位：元" prop="f015n">
                      <el-input v-model="formData.f015n" placeholder="请输入存货	单位：元" />
                    </el-form-item>
                    <el-form-item label="其中：消耗性生物资产	单位：元" prop="f016n">
                      <el-input v-model="formData.f016n" placeholder="请输入其中：消耗性生物资产	单位：元" />
                    </el-form-item>
                    <el-form-item label="划分为持有待售的资产	单位：元" prop="f085n">
                      <el-input v-model="formData.f085n" placeholder="请输入划分为持有待售的资产	单位：元" />
                    </el-form-item>
                    <el-form-item label="发放贷款及垫款-流动资产	单位：元" prop="f079n">
                      <el-input v-model="formData.f079n" placeholder="请输入发放贷款及垫款-流动资产	单位：元" />
                    </el-form-item>
                    <el-form-item label="一年内到期的非流动资产	单位：元" prop="f017n">
                      <el-input v-model="formData.f017n" placeholder="请输入一年内到期的非流动资产	单位：元" />
                    </el-form-item>
                    <el-form-item label="交易性金融资产	单位：元" prop="f117n">
                      <el-input v-model="formData.f117n" placeholder="请输入交易性金融资产	单位：元" />
                    </el-form-item>
                    <el-form-item label="应收票据及应收账款	单位：元" prop="f118n">
                      <el-input v-model="formData.f118n" placeholder="请输入应收票据及应收账款	单位：元" />
                    </el-form-item>
                    <el-form-item label="合同资产	单位：元" prop="f119n">
                      <el-input v-model="formData.f119n" placeholder="请输入合同资产	单位：元" />
                    </el-form-item>
                    <el-form-item label="其他流动资产	单位：元" prop="f018n">
                      <el-input v-model="formData.f018n" placeholder="请输入其他流动资产	单位：元" />
                    </el-form-item>
                    <el-form-item label="流动资产合计	单位：元" prop="f019n">
                      <el-input v-model="formData.f019n" placeholder="请输入流动资产合计	单位：元" />
                    </el-form-item>
                    <el-form-item label="发放贷款及垫款-非流动资产	单位：元" prop="f086n">
                      <el-input v-model="formData.f086n" placeholder="请输入发放贷款及垫款-非流动资产	单位：元" />
                    </el-form-item>
                    <el-form-item label="可供出售金融资产	单位：元" prop="f020n">
                      <el-input v-model="formData.f020n" placeholder="请输入可供出售金融资产	单位：元" />
                    </el-form-item>
                    <el-form-item label="持有至到期投资	单位：元" prop="f021n">
                      <el-input v-model="formData.f021n" placeholder="请输入持有至到期投资	单位：元" />
                    </el-form-item>
                    <el-form-item label="长期应收款	单位：元" prop="f022n">
                      <el-input v-model="formData.f022n" placeholder="请输入长期应收款	单位：元" />
                    </el-form-item>
                    <el-form-item label="长期股权投资	单位：元" prop="f023n">
                      <el-input v-model="formData.f023n" placeholder="请输入长期股权投资	单位：元" />
                    </el-form-item>
                    <el-form-item label="投资性房地产	单位：元" prop="f024n">
                      <el-input v-model="formData.f024n" placeholder="请输入投资性房地产	单位：元" />
                    </el-form-item>
                    <el-form-item label="固定资产	单位：元" prop="f025n">
                      <el-input v-model="formData.f025n" placeholder="请输入固定资产	单位：元" />
                    </el-form-item>
                    <el-form-item label="在建工程	单位：元" prop="f026n">
                      <el-input v-model="formData.f026n" placeholder="请输入在建工程	单位：元" />
                    </el-form-item>
                    <el-form-item label="工程物资	单位：元" prop="f027n">
                      <el-input v-model="formData.f027n" placeholder="请输入工程物资	单位：元" />
                    </el-form-item>
                    <el-form-item label="固定资产清理	单位：元" prop="f028n">
                      <el-input v-model="formData.f028n" placeholder="请输入固定资产清理	单位：元" />
                    </el-form-item>
                    <el-form-item label="生产性生物资产	单位：元" prop="f029n">
                      <el-input v-model="formData.f029n" placeholder="请输入生产性生物资产	单位：元" />
                    </el-form-item>
                    <el-form-item label="油气资产	单位：元" prop="f030n">
                      <el-input v-model="formData.f030n" placeholder="请输入油气资产	单位：元" />
                    </el-form-item>
                    <el-form-item label="无形资产	单位：元" prop="f031n">
                      <el-input v-model="formData.f031n" placeholder="请输入无形资产	单位：元" />
                    </el-form-item>
                    <el-form-item label="开发支出	单位：元" prop="f032n">
                      <el-input v-model="formData.f032n" placeholder="请输入开发支出	单位：元" />
                    </el-form-item>
                    <el-form-item label="商誉	单位：元" prop="f033n">
                      <el-input v-model="formData.f033n" placeholder="请输入商誉	单位：元" />
                    </el-form-item>
                    <el-form-item label="长期待摊费用	单位：元" prop="f034n">
                      <el-input v-model="formData.f034n" placeholder="请输入长期待摊费用	单位：元" />
                    </el-form-item>
                    <el-form-item label="递延所得税资产	单位：元" prop="f035n">
                      <el-input v-model="formData.f035n" placeholder="请输入递延所得税资产	单位：元" />
                    </el-form-item>
                    <el-form-item label="债权投资	单位：元" prop="f116n">
                      <el-input v-model="formData.f116n" placeholder="请输入债权投资	单位：元" />
                    </el-form-item>
                    <el-form-item label="其他债权投资	单位：元" prop="f110n">
                      <el-input v-model="formData.f110n" placeholder="请输入其他债权投资	单位：元" />
                    </el-form-item>
                    <el-form-item label="其他权益工具投资	单位：元" prop="f111n">
                      <el-input v-model="formData.f111n" placeholder="请输入其他权益工具投资	单位：元" />
                    </el-form-item>
                    <el-form-item label="其他非流动金融资产	单位：元" prop="f112n">
                      <el-input v-model="formData.f112n" placeholder="请输入其他非流动金融资产	单位：元" />
                    </el-form-item>
                    <el-form-item label="其他非流动资产	单位：元" prop="f036n">
                      <el-input v-model="formData.f036n" placeholder="请输入其他非流动资产	单位：元" />
                    </el-form-item>
                    <el-form-item label="非流动资产合计	单位：元" prop="f037n">
                      <el-input v-model="formData.f037n" placeholder="请输入非流动资产合计	单位：元" />
                    </el-form-item>
                    <el-form-item label="资产总计	单位：元" prop="f038n">
                      <el-input v-model="formData.f038n" placeholder="请输入资产总计	单位：元" />
                    </el-form-item>
                    <el-form-item label="短期借款	单位：元" prop="f039n">
                      <el-input v-model="formData.f039n" placeholder="请输入短期借款	单位：元" />
                    </el-form-item>
                    <el-form-item label="向中央银行借款	单位：元" prop="f087n">
                      <el-input v-model="formData.f087n" placeholder="请输入向中央银行借款	单位：元" />
                    </el-form-item>
                    <el-form-item label="吸收存款及同业存放	单位：元" prop="f088n">
                      <el-input v-model="formData.f088n" placeholder="请输入吸收存款及同业存放	单位：元" />
                    </el-form-item>
                    <el-form-item label="拆入资金	单位：元" prop="f089n">
                      <el-input v-model="formData.f089n" placeholder="请输入拆入资金	单位：元" />
                    </el-form-item>
                    <el-form-item label="以公允价值计量且其变动计入当期损益的金融负债（20190322弃用）	单位：元" prop="f040n">
                      <el-input v-model="formData.f040n" placeholder="请输入以公允价值计量且其变动计入当期损益的金融负债（20190322弃用）	单位：元" />
                    </el-form-item>
                    <el-form-item label="衍生金融负债	单位：元" prop="f090n">
                      <el-input v-model="formData.f090n" placeholder="请输入衍生金融负债	单位：元" />
                    </el-form-item>
                    <el-form-item label="应付票据	单位：元" prop="f041n">
                      <el-input v-model="formData.f041n" placeholder="请输入应付票据	单位：元" />
                    </el-form-item>
                    <el-form-item label="应付账款	单位：元" prop="f042n">
                      <el-input v-model="formData.f042n" placeholder="请输入应付账款	单位：元" />
                    </el-form-item>
                    <el-form-item label="预收款项	单位：元" prop="f043n">
                      <el-input v-model="formData.f043n" placeholder="请输入预收款项	单位：元" />
                    </el-form-item>
                    <el-form-item label="卖出回购金融资产款	单位：元" prop="f091n">
                      <el-input v-model="formData.f091n" placeholder="请输入卖出回购金融资产款	单位：元" />
                    </el-form-item>
                    <el-form-item label="应付手续费及佣金	单位：元" prop="f092n">
                      <el-input v-model="formData.f092n" placeholder="请输入应付手续费及佣金	单位：元" />
                    </el-form-item>
                    <el-form-item label="应付职工薪酬	单位：元" prop="f044n">
                      <el-input v-model="formData.f044n" placeholder="请输入应付职工薪酬	单位：元" />
                    </el-form-item>
                    <el-form-item label="应交税费	单位：元" prop="f045n">
                      <el-input v-model="formData.f045n" placeholder="请输入应交税费	单位：元" />
                    </el-form-item>
                    <el-form-item label="其中：应付利息	单位：元" prop="f046n">
                      <el-input v-model="formData.f046n" placeholder="请输入其中：应付利息	单位：元" />
                    </el-form-item>
                    <el-form-item label="其中：应付股利	单位：元" prop="f047n">
                      <el-input v-model="formData.f047n" placeholder="请输入其中：应付股利	单位：元" />
                    </el-form-item>
                    <el-form-item label="其他应付款	单位：元" prop="f048n">
                      <el-input v-model="formData.f048n" placeholder="请输入其他应付款	单位：元" />
                    </el-form-item>
                    <el-form-item label="应付关联公司款	单位：元" prop="f049n">
                      <el-input v-model="formData.f049n" placeholder="请输入应付关联公司款	单位：元" />
                    </el-form-item>
                    <el-form-item label="应付分保账款	单位：元" prop="f093n">
                      <el-input v-model="formData.f093n" placeholder="请输入应付分保账款	单位：元" />
                    </el-form-item>
                    <el-form-item label="保险合同准备金	单位：元" prop="f094n">
                      <el-input v-model="formData.f094n" placeholder="请输入保险合同准备金	单位：元" />
                    </el-form-item>
                    <el-form-item label="代理买卖证券款	单位：元" prop="f095n">
                      <el-input v-model="formData.f095n" placeholder="请输入代理买卖证券款	单位：元" />
                    </el-form-item>
                    <el-form-item label="代理承销证券款	单位：元" prop="f096n">
                      <el-input v-model="formData.f096n" placeholder="请输入代理承销证券款	单位：元" />
                    </el-form-item>
                    <el-form-item label="划分为持有待售的负债	单位：元" prop="f097n">
                      <el-input v-model="formData.f097n" placeholder="请输入划分为持有待售的负债	单位：元" />
                    </el-form-item>
                    <el-form-item label="一年内到期的非流动负债	单位：元" prop="f050n">
                      <el-input v-model="formData.f050n" placeholder="请输入一年内到期的非流动负债	单位：元" />
                    </el-form-item>
                    <el-form-item label="预计负债-流动负债	单位：元" prop="f098n">
                      <el-input v-model="formData.f098n" placeholder="请输入预计负债-流动负债	单位：元" />
                    </el-form-item>
                    <el-form-item label="递延收益-流动负债	单位：元" prop="f099n">
                      <el-input v-model="formData.f099n" placeholder="请输入递延收益-流动负债	单位：元" />
                    </el-form-item>
                    <el-form-item label="交易性金融负债	单位：元" prop="f113n">
                      <el-input v-model="formData.f113n" placeholder="请输入交易性金融负债	单位：元" />
                    </el-form-item>
                    <el-form-item label="应付票据及应付账款	单位：元" prop="f114n">
                      <el-input v-model="formData.f114n" placeholder="请输入应付票据及应付账款	单位：元" />
                    </el-form-item>
                    <el-form-item label="合同负债	单位：元" prop="f115n">
                      <el-input v-model="formData.f115n" placeholder="请输入合同负债	单位：元" />
                    </el-form-item>
                    <el-form-item label="其他流动负债	单位：元" prop="f051n">
                      <el-input v-model="formData.f051n" placeholder="请输入其他流动负债	单位：元" />
                    </el-form-item>
                    <el-form-item label="流动负债合计	单位：元" prop="f052n">
                      <el-input v-model="formData.f052n" placeholder="请输入流动负债合计	单位：元" />
                    </el-form-item>
                    <el-form-item label="长期借款	单位：元" prop="f053n">
                      <el-input v-model="formData.f053n" placeholder="请输入长期借款	单位：元" />
                    </el-form-item>
                    <el-form-item label="应付债券	单位：元" prop="f054n">
                      <el-input v-model="formData.f054n" placeholder="请输入应付债券	单位：元" />
                    </el-form-item>
                    <el-form-item label="其中：优先股-非流动负债	单位：元" prop="f100n">
                      <el-input v-model="formData.f100n" placeholder="请输入其中：优先股-非流动负债	单位：元" />
                    </el-form-item>
                    <el-form-item label="永续债-非流动负债	单位：元" prop="f101n">
                      <el-input v-model="formData.f101n" placeholder="请输入永续债-非流动负债	单位：元" />
                    </el-form-item>
                    <el-form-item label="长期应付款	单位：元" prop="f055n">
                      <el-input v-model="formData.f055n" placeholder="请输入长期应付款	单位：元" />
                    </el-form-item>
                    <el-form-item label="长期应付职工薪酬	单位：元" prop="f102n">
                      <el-input v-model="formData.f102n" placeholder="请输入长期应付职工薪酬	单位：元" />
                    </el-form-item>
                    <el-form-item label="专项应付款	单位：元" prop="f056n">
                      <el-input v-model="formData.f056n" placeholder="请输入专项应付款	单位：元" />
                    </el-form-item>
                    <el-form-item label="预计负债	单位：元" prop="f057n">
                      <el-input v-model="formData.f057n" placeholder="请输入预计负债	单位：元" />
                    </el-form-item>
                    <el-form-item label="递延收益-非流动负债	单位：元" prop="f075n">
                      <el-input v-model="formData.f075n" placeholder="请输入递延收益-非流动负债	单位：元" />
                    </el-form-item>
                    <el-form-item label="递延所得税负债	单位：元" prop="f058n">
                      <el-input v-model="formData.f058n" placeholder="请输入递延所得税负债	单位：元" />
                    </el-form-item>
                    <el-form-item label="其他非流动负债	单位：元" prop="f059n">
                      <el-input v-model="formData.f059n" placeholder="请输入其他非流动负债	单位：元" />
                    </el-form-item>
                    <el-form-item label="非流动负债合计	单位：元" prop="f060n">
                      <el-input v-model="formData.f060n" placeholder="请输入非流动负债合计	单位：元" />
                    </el-form-item>
                    <el-form-item label="负债合计	单位：元" prop="f061n">
                      <el-input v-model="formData.f061n" placeholder="请输入负债合计	单位：元" />
                    </el-form-item>
                    <el-form-item label="实收资本（或股本）	单位：元" prop="f062n">
                      <el-input v-model="formData.f062n" placeholder="请输入实收资本（或股本）	单位：元" />
                    </el-form-item>
                    <el-form-item label="其他权益工具	单位：元" prop="f103n">
                      <el-input v-model="formData.f103n" placeholder="请输入其他权益工具	单位：元" />
                    </el-form-item>
                    <el-form-item label="其中：优先股-所有者权益	单位：元" prop="f104n">
                      <el-input v-model="formData.f104n" placeholder="请输入其中：优先股-所有者权益	单位：元" />
                    </el-form-item>
                    <el-form-item label="永续债-所有者权益	单位：元" prop="f105n">
                      <el-input v-model="formData.f105n" placeholder="请输入永续债-所有者权益	单位：元" />
                    </el-form-item>
                    <el-form-item label="资本公积	单位：元" prop="f063n">
                      <el-input v-model="formData.f063n" placeholder="请输入资本公积	单位：元" />
                    </el-form-item>
                    <el-form-item label="减：库存股	单位：元" prop="f066n">
                      <el-input v-model="formData.f066n" placeholder="请输入减：库存股	单位：元" />
                    </el-form-item>
                    <el-form-item label="其他综合收益	单位：元" prop="f074n">
                      <el-input v-model="formData.f074n" placeholder="请输入其他综合收益	单位：元" />
                    </el-form-item>
                    <el-form-item label="专项储备	单位：元" prop="f072n">
                      <el-input v-model="formData.f072n" placeholder="请输入专项储备	单位：元" />
                    </el-form-item>
                    <el-form-item label="盈余公积	单位：元" prop="f064n">
                      <el-input v-model="formData.f064n" placeholder="请输入盈余公积	单位：元" />
                    </el-form-item>
                    <el-form-item label="一般风险准备	单位：元" prop="f076n">
                      <el-input v-model="formData.f076n" placeholder="请输入一般风险准备	单位：元" />
                    </el-form-item>
                    <el-form-item label="未分配利润	单位：元" prop="f065n">
                      <el-input v-model="formData.f065n" placeholder="请输入未分配利润	单位：元" />
                    </el-form-item>
                    <el-form-item label="外币报表折算价差	单位：元" prop="f068n">
                      <el-input v-model="formData.f068n" placeholder="请输入外币报表折算价差	单位：元" />
                    </el-form-item>
                    <el-form-item label="归属于母公司所有者权益	单位：元" prop="f073n">
                      <el-input v-model="formData.f073n" placeholder="请输入归属于母公司所有者权益	单位：元" />
                    </el-form-item>
                    <el-form-item label="少数股东权益	单位：元" prop="f067n">
                      <el-input v-model="formData.f067n" placeholder="请输入少数股东权益	单位：元" />
                    </el-form-item>
                    <el-form-item label="非正常经营项目收益调整	单位：元" prop="f069n">
                      <el-input v-model="formData.f069n" placeholder="请输入非正常经营项目收益调整	单位：元" />
                    </el-form-item>
                    <el-form-item label="所有者权益（或股东权益）合计	单位：元" prop="f070n">
                      <el-input v-model="formData.f070n" placeholder="请输入所有者权益（或股东权益）合计	单位：元" />
                    </el-form-item>
                    <el-form-item label="负债和所有者（或股东权益）合计	单位：元" prop="f071n">
                      <el-input v-model="formData.f071n" placeholder="请输入负债和所有者（或股东权益）合计	单位：元" />
                    </el-form-item>
                    <el-form-item label="备注" prop="memo">
                      <el-input v-model="formData.memo" placeholder="请输入备注" />
                    </el-form-item>
                    <el-form-item label="应收款项融资	2019年8月新增" prop="f120n">
                      <el-input v-model="formData.f120n" placeholder="请输入应收款项融资	2019年8月新增" />
                    </el-form-item>
                    <el-form-item label="使用权资产	2019年8月新增" prop="f121n">
                      <el-input v-model="formData.f121n" placeholder="请输入使用权资产	2019年8月新增" />
                    </el-form-item>
                    <el-form-item label="租赁负债	2019年8月新增" prop="f122n">
                      <el-input v-model="formData.f122n" placeholder="请输入租赁负债	2019年8月新增" />
                    </el-form-item>
      </el-form>
              <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm" :disabled="formLoading">确 定</el-button>
        <el-button @click="dialogVisible = false">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
  import * as ZcfzBaseApi from '@/api/invest/zcfzbase';
      export default {
    name: "ZcfzBaseForm",
    components: {
                    },
    data() {
      return {
        // 弹出层标题
        dialogTitle: "",
        // 是否显示弹出层
        dialogVisible: false,
        // 表单的加载中：1）修改时的数据加载；2）提交的按钮禁用
        formLoading: false,
        // 表单参数
        formData: {
                            id: undefined,
                            secname: undefined,
                            seccode: undefined,
                            orgname: undefined,
                            declaredate: undefined,
                            enddate: undefined,
                            f001d: undefined,
                            f002v: undefined,
                            f003v: undefined,
                            f004v: undefined,
                            f005v: undefined,
                            f006n: undefined,
                            f077n: undefined,
                            f078n: undefined,
                            f007n: undefined,
                            f080n: undefined,
                            f008n: undefined,
                            f009n: undefined,
                            f010n: undefined,
                            f081n: undefined,
                            f082n: undefined,
                            f083n: undefined,
                            f013n: undefined,
                            f014n: undefined,
                            f011n: undefined,
                            f012n: undefined,
                            f084n: undefined,
                            f015n: undefined,
                            f016n: undefined,
                            f085n: undefined,
                            f079n: undefined,
                            f017n: undefined,
                            f117n: undefined,
                            f118n: undefined,
                            f119n: undefined,
                            f018n: undefined,
                            f019n: undefined,
                            f086n: undefined,
                            f020n: undefined,
                            f021n: undefined,
                            f022n: undefined,
                            f023n: undefined,
                            f024n: undefined,
                            f025n: undefined,
                            f026n: undefined,
                            f027n: undefined,
                            f028n: undefined,
                            f029n: undefined,
                            f030n: undefined,
                            f031n: undefined,
                            f032n: undefined,
                            f033n: undefined,
                            f034n: undefined,
                            f035n: undefined,
                            f116n: undefined,
                            f110n: undefined,
                            f111n: undefined,
                            f112n: undefined,
                            f036n: undefined,
                            f037n: undefined,
                            f038n: undefined,
                            f039n: undefined,
                            f087n: undefined,
                            f088n: undefined,
                            f089n: undefined,
                            f040n: undefined,
                            f090n: undefined,
                            f041n: undefined,
                            f042n: undefined,
                            f043n: undefined,
                            f091n: undefined,
                            f092n: undefined,
                            f044n: undefined,
                            f045n: undefined,
                            f046n: undefined,
                            f047n: undefined,
                            f048n: undefined,
                            f049n: undefined,
                            f093n: undefined,
                            f094n: undefined,
                            f095n: undefined,
                            f096n: undefined,
                            f097n: undefined,
                            f050n: undefined,
                            f098n: undefined,
                            f099n: undefined,
                            f113n: undefined,
                            f114n: undefined,
                            f115n: undefined,
                            f051n: undefined,
                            f052n: undefined,
                            f053n: undefined,
                            f054n: undefined,
                            f100n: undefined,
                            f101n: undefined,
                            f055n: undefined,
                            f102n: undefined,
                            f056n: undefined,
                            f057n: undefined,
                            f075n: undefined,
                            f058n: undefined,
                            f059n: undefined,
                            f060n: undefined,
                            f061n: undefined,
                            f062n: undefined,
                            f103n: undefined,
                            f104n: undefined,
                            f105n: undefined,
                            f063n: undefined,
                            f066n: undefined,
                            f074n: undefined,
                            f072n: undefined,
                            f064n: undefined,
                            f076n: undefined,
                            f065n: undefined,
                            f068n: undefined,
                            f073n: undefined,
                            f067n: undefined,
                            f069n: undefined,
                            f070n: undefined,
                            f071n: undefined,
                            memo: undefined,
                            f120n: undefined,
                            f121n: undefined,
                            f122n: undefined,
        },
        // 表单校验
        formRules: {
        },
                        };
    },
    methods: {
      /** 打开弹窗 */
     async open(id) {
        this.dialogVisible = true;
        this.reset();
        // 修改时，设置数据
        if (id) {
          this.formLoading = true;
          try {
            const res = await ZcfzBaseApi.getZcfzBase(id);
            this.formData = res.data;
            this.title = "修改个股报告期资产负债";
          } finally {
            this.formLoading = false;
          }
        }
        this.title = "新增个股报告期资产负债";
              },
      /** 提交按钮 */
      async submitForm() {
        // 校验主表
        await this.$refs["formRef"].validate();
                  this.formLoading = true;
        try {
          const data = this.formData;
                  // 修改的提交
          if (data.id) {
            await ZcfzBaseApi.updateZcfzBase(data);
            this.$modal.msgSuccess("修改成功");
            this.dialogVisible = false;
            this.$emit('success');
            return;
          }
          // 添加的提交
          await ZcfzBaseApi.createZcfzBase(data);
          this.$modal.msgSuccess("新增成功");
          this.dialogVisible = false;
          this.$emit('success');
        } finally {
          this.formLoading = false;
        }
      },
                      /** 表单重置 */
      reset() {
        this.formData = {
                            id: undefined,
                            secname: undefined,
                            seccode: undefined,
                            orgname: undefined,
                            declaredate: undefined,
                            enddate: undefined,
                            f001d: undefined,
                            f002v: undefined,
                            f003v: undefined,
                            f004v: undefined,
                            f005v: undefined,
                            f006n: undefined,
                            f077n: undefined,
                            f078n: undefined,
                            f007n: undefined,
                            f080n: undefined,
                            f008n: undefined,
                            f009n: undefined,
                            f010n: undefined,
                            f081n: undefined,
                            f082n: undefined,
                            f083n: undefined,
                            f013n: undefined,
                            f014n: undefined,
                            f011n: undefined,
                            f012n: undefined,
                            f084n: undefined,
                            f015n: undefined,
                            f016n: undefined,
                            f085n: undefined,
                            f079n: undefined,
                            f017n: undefined,
                            f117n: undefined,
                            f118n: undefined,
                            f119n: undefined,
                            f018n: undefined,
                            f019n: undefined,
                            f086n: undefined,
                            f020n: undefined,
                            f021n: undefined,
                            f022n: undefined,
                            f023n: undefined,
                            f024n: undefined,
                            f025n: undefined,
                            f026n: undefined,
                            f027n: undefined,
                            f028n: undefined,
                            f029n: undefined,
                            f030n: undefined,
                            f031n: undefined,
                            f032n: undefined,
                            f033n: undefined,
                            f034n: undefined,
                            f035n: undefined,
                            f116n: undefined,
                            f110n: undefined,
                            f111n: undefined,
                            f112n: undefined,
                            f036n: undefined,
                            f037n: undefined,
                            f038n: undefined,
                            f039n: undefined,
                            f087n: undefined,
                            f088n: undefined,
                            f089n: undefined,
                            f040n: undefined,
                            f090n: undefined,
                            f041n: undefined,
                            f042n: undefined,
                            f043n: undefined,
                            f091n: undefined,
                            f092n: undefined,
                            f044n: undefined,
                            f045n: undefined,
                            f046n: undefined,
                            f047n: undefined,
                            f048n: undefined,
                            f049n: undefined,
                            f093n: undefined,
                            f094n: undefined,
                            f095n: undefined,
                            f096n: undefined,
                            f097n: undefined,
                            f050n: undefined,
                            f098n: undefined,
                            f099n: undefined,
                            f113n: undefined,
                            f114n: undefined,
                            f115n: undefined,
                            f051n: undefined,
                            f052n: undefined,
                            f053n: undefined,
                            f054n: undefined,
                            f100n: undefined,
                            f101n: undefined,
                            f055n: undefined,
                            f102n: undefined,
                            f056n: undefined,
                            f057n: undefined,
                            f075n: undefined,
                            f058n: undefined,
                            f059n: undefined,
                            f060n: undefined,
                            f061n: undefined,
                            f062n: undefined,
                            f103n: undefined,
                            f104n: undefined,
                            f105n: undefined,
                            f063n: undefined,
                            f066n: undefined,
                            f074n: undefined,
                            f072n: undefined,
                            f064n: undefined,
                            f076n: undefined,
                            f065n: undefined,
                            f068n: undefined,
                            f073n: undefined,
                            f067n: undefined,
                            f069n: undefined,
                            f070n: undefined,
                            f071n: undefined,
                            memo: undefined,
                            f120n: undefined,
                            f121n: undefined,
                            f122n: undefined,
        };
        this.resetForm("formRef");
      }
    }
  };
</script>